package com.cslg.ac.demo.entity.donate;

import com.cslg.ac.demo.util.integer.IntegerUtil;

public class Donation {
    private Integer id;
    private Integer userId;
    private Integer teamId;
    private String donateTime;
    private Integer cardType;
    private Integer cardCount;

    public Donation() {
    }

    public Boolean insertValid(){
        if(!IntegerUtil.valid(cardType,0,1) || cardCount <= 0){
            return false;
        }
        return true;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getTeamId() {
        return teamId;
    }

    public void setTeamId(Integer teamId) {
        this.teamId = teamId;
    }

    public String getDonateTime() {
        return donateTime;
    }

    public void setDonateTime(String donateTime) {
        this.donateTime = donateTime;
    }

    public Integer getCardType() {
        return cardType;
    }

    public void setCardType(Integer cardType) {
        this.cardType = cardType;
    }

    public Integer getCardCount() {
        return cardCount;
    }

    public void setCardCount(Integer cardCount) {
        this.cardCount = cardCount;
    }

    @Override
    public String toString() {
        return "DonationPO{" +
                "id=" + id +
                ", userId=" + userId +
                ", teamId=" + teamId +
                ", donateTime='" + donateTime + '\'' +
                ", cardType=" + cardType +
                ", cardCount=" + cardCount +
                '}';
    }
}
